<?php

use App\Http\Controllers\TopicController;
use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});

// 创建帖子资源路由
Route::resource('topic',TopicController::class)->except(['create','edit']);


Route::prefix('auth')->controller(UserController::class)->group(function(){
    Route::post('login','login');
    Route::post('register','register');
    Route::post('logout','logout');

});